<template>
  <div class="exception">
    <div class="ecContent">
      <div class="img">
        <img src="~@/assets/noPermission.svg" />
      </div>
      <div class="content1">
        <h1>暂无权限</h1>
        <div class="desc1">您好，当前应用系统您暂无权限访问，如有需要请您联系业务系统管理员开通！</div>
        <div class="action">
          <a-button type="primary" @click="handleToHome" style="margin-right: 10px;">返回首页</a-button>
          <a-button @click="closePage" style="margin-left: 10px;">关闭页面</a-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Exception',
  data() {
    return {}
  },
  methods: {
    handleToHome() {
      this.$router.push({ name: 'dashboard' })
    },
    closePage() {
      window.location.href = 'about:blank'
      window.close()
    }
  }
}
</script>

<style lang="less" scoped>
.exception {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;

  .ecContent {
    display: flex;
    align-items: center;
    height: 80%;
    flex-direction: column;

    .img {
      img {
        height: 270px;
        //max-width: 430px;
      }
    }

    h1 {
      text-align: center;
      color: #434e59;
      font-size: 30px;
      font-weight: 600;
      line-height: 72px;
      margin-bottom: unset;
    }

    .desc1 {
      text-align: center;
      color: rgba(0, 0, 0, .45);
      font-size: 18px;
    }

    .action {
      margin-top: 25px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }
}
</style>